﻿using StoryMaker.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Markup;
using System.Windows.Media;

namespace StoryMaker.Application
{
    public class IsDefaultBrushExtension : MarkupExtension
    {
        private Brush _brush;
        private ShapeViewTemplates _template;
        public IsDefaultBrushExtension(Brush brush, ShapeViewTemplates template)
        {
            _brush = brush;
            _template = template;
        }
        public override object ProvideValue(IServiceProvider serviceProvider)
        {
            if (_brush == null && _template == null)
            {
                return _template.DefaultBrush == _brush;
            }
            return false;
        }
    }
}
